﻿using Abp.AutoMapper;
using Akso.Classrooms.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Akso.Web.Areas.BasicDataModule.Models.Classrooms
{
    /// <summary>
    /// 在弹出的新增、修改窗口里面，传递给页面的ViewModel对象。
    /// </summary>
    [AutoMapFrom(typeof(GetClassroomForEditOutput))]
    public class CreateOrEditClassroomModalViewModel : GetClassroomForEditOutput
    {
        public bool IsEditMode
        {
            get { return Classroom.Id.HasValue; }
        }

        public CreateOrEditClassroomModalViewModel(GetClassroomForEditOutput output)
        {
            output.MapTo(this);
        }
    }
}